load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("scm_server_infra")

rust_library(
    name = "blobimport_lib",
    srcs = glob(["src/**/*.rs"]),
    named_deps = {
        "futures-old": "fbsource//third-party/rust:futures-old",
    },
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:ascii",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        ":consts",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/failure_ext:failure_ext",
        "//common/rust/shed/futures_01_ext:futures_01_ext",
        "//common/rust/shed/futures_ext:futures_ext",
        "//eden/mononoke/blobrepo:blobrepo_hg",
        "//eden/mononoke/derived_data:bulk_derivation",
        "//eden/mononoke/features/commit_rewriting/synced_commit_mapping:synced_commit_mapping",
        "//eden/mononoke/lfs_import_lib:lfs_import_lib",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mercurial:mercurial_revlog",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/bonsai_git_mapping:bonsai_git_mapping",
        "//eden/mononoke/repo_attributes/bonsai_globalrev_mapping:bonsai_globalrev_mapping",
        "//eden/mononoke/repo_attributes/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/repo_attributes/bookmarks:bookmarks",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/filestore:filestore",
        "//eden/mononoke/repo_attributes/mutable_counters:mutable_counters",
        "//eden/mononoke/repo_attributes/phases:phases",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "consts",
    srcs = glob(["consts/**/*.rs"]),
    autocargo = {"cargo_toml_dir": "consts"},
    deps = [],
)
